<template>
  <div class="container">
    <el-dialog title="题目审核" :visible="isDialog" :before-close="cls" width="450px">
      <div style="margin: 20px 0">
        <el-radio-group v-model="chkState">
          <el-radio :label="1">通过</el-radio>
          <el-radio :label="2">拒绝</el-radio>
        </el-radio-group>
      </div>
      <el-input style="margin: 20px 0 50px 0" type="textarea" :rows="2" placeholder="请输入审核意见" v-model="chkRemarks"> </el-input>
      <el-row type="flex" align="center" justify="end">
        <el-button @click="cls">取消</el-button>
        <el-button type="primary" @click="sure">确认</el-button>
      </el-row>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    isDialog: {
      type: Boolean,
      default: false
    },
    dialogList: {
      type: Object
    }
  },
  data () {
    return {
      id: null,
      chkState: 1,
      chkRemarks: ''
    }
  },
  methods: {
    cls () {
      this.$emit('update:isDialog', false)
    },
    async sure () {
      this.id = this.dialogList.id
      this.$emit('sure', this.chkState, this.chkRemarks, this.id)
    }
  }
}
</script>

<style scoped lang='less'></style>
